1. Field of the Invention
This invention relates generally to shared stacks in computing devices and more specifically to a system and method for a hardware assisted stack that may alleviate demands on a shared stack.
2. Description of the Related Art
Under the typical operating environment of a personal computer (PC), when the PC is powered up, it undergoes a boot process. This boot process typically involves one or more self-tests and executing a boot program stored permanently in read only memory (ROM) that contains the PC's basic input/output system (SBIOS) code. The SBIOS code typically performs a number of initialization routines (e.g., initializing main memory, disk drives, etc.) that prepare the system for normal usage.
The SBIOS may also call other routines in ROM (referred to as Option ROM functions) to perform various initialization routines. The routines to initialize a display device, commonly referred to as the video BIOS (or VBIOS) is one example of such an Option ROM. There is no standard specification which guarantees the amount of writeable memory (stack) space for Option ROMs. Therefore, when calling an Option ROM function, such as VBIOS, adequate local stack space must be provided for the ROM functionality to operate properly.
Unfortunately, there is typically only a limited amount of stack space available as a shared resource to all processes running at any given time. The amount of stack space required to be passed to the VBIOS is not typically defined, and a certain level of compatibility is typically empirically confirmed by execution of a number of existing (or “legacy”) software/hardware configurations. Newer products typically are designed to be backwards compatible with many legacy system configurations. Thus, the design typically includes empirically checking that the VBIOS does not exceed the stack usage limitations of these legacy configurations.
However, increasingly complex support requirements of newer PC configurations beyond the original IBM VGA design (e.g., to support multiple display heads, flat panels, high definition television-HDTV displays, and the like) have resulted in more complex software in the VBIOS. This increase in complexity tends to conflict with the stack usage limitations of legacy systems, as more stack space is required. In other words, the code added to VBIOS to support these increasingly complex requirements tends to consume more and more of a very limited resource (the stack) that all the software running in that environment has to share.
Eventually, a collision may occur where some software code runs out of stack space with potentially catastrophic effects. For example, return addresses pushed onto the stack may be lost such that programs that made calls to routines may not be able to return to the proper location in the code (from where the call was made), other types of precious data may be lost, and the PC may be rendered unusable. Access to additional memory resources that could be used by the VBIOS to accommodate increased stack requirements are limited, as the VBIOS execution environment does not allow for dynamic memory allocation from which a new stack may be created.
Accordingly, what is needed is a method and system to provide additional stack space in systems with limited shared stack resources.